// @Bind #dataSetDropDownIoType.beforeExecute
!function(self, arg) {
	var dsTypesData = view.id("dsTypesData");

	dsTypesData.set("parameter", {
		"typeName" : 'iotype'
	});

}

// @Bind #dtInvIO.onCurrentChange
!function(self, arg) {
	var dsInvIO = view.id("dsInvIO");
	var invIO = dsInvIO.getData("#");
	var uuid = invIO.get("uuid");
	// dorado.MessageBox.alert(invIOId);

	var dsInvIODetail = view.id("dsInvIODetail");
	dsInvIODetail.clear();
	dsInvIODetail.set("parameter", {
		"invIOUid" : uuid
	});
	dsInvIODetail.flush();
}

// @Bind #dgInvIO.onContextMenu
!function(self, arg) {
	view.id("rightKeyMenu1").show({
		position : {
			left : arg.event.pageX,
			top : arg.event.pageY
		}
	});
}

// @Bind #manuSave.onClick
!function(self, arg) {
	var dsInvIO = view.id("dsInvIO");
	var invIO = dsInvIO.getData("#");
	var uuid = invIO.get("uuid");
	window.location.href = "view.inventory.MaterialIn.d?invIOId=" + uuid;
}

// @Bind #dgInvIODetail.onContextMenu
!function(self, arg) {
	view.id("rightKeyMenu2").show({
		position : {
			left : arg.event.pageX,
			top : arg.event.pageY
		}
	});
}

// @Bind #menuChange.onClick
!function(self, arg) {
	window.location.href = "view.inventory.WarebinChange.d"
}

// @Bind #manuMaterialIn.onClick
!function(self, arg) {
	window.location.href = "view.inventory.MaterialIn.d?ioType="+19;
}

// @Bind #barRemove.onClick
!function(self, arg) {
	var dsInvIODetail = view.id("dsInvIODetail");
	var invIODetail = dsInvIODetail.getData("#");
	if (invIODetail.toArray().length > 0) {
		invIODetail.remove();
	} else {
		dorado.MessageBox.alert("没有可删除的数据...");
	}
	invIODetail.remove();
}
